<%@ page import="java.util.ArrayList" %>
<%@ page import="com.atguigu.pojo.Student" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2023/4/10
  Time: 14:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>

    <title>Title</title>
    <style>
        table {
            border: 1px blue solid;
            width: 600px;
            border-collapse: collapse;
        }

        td, th {
            border: 1px blue solid;
        }
    </style>
</head>
<body>
<%
    List<Student> studentList = new ArrayList<>();
    for (int i = 0; i < 10; i++) {
        int t = i + 1;
        studentList.add(new Student(i + 1, "name" + t, 18 + t, "phone" + t));
    }
%>
<table>

    <% for (Student student : studentList) { %>
    <tr>
        <td><%= student.getId() %>
        </td>
        <td><%= student.getString() %>
        </td>
        <td><%= student.getAge() %>
        </td>
        <td><%= student.getPhone() %>
        </td>
        <td><%= student.getId() %>
        </td>
    </tr>

    <br>
    <% }

    %>
</table>
</body>
</html>
